package chances.wechat.service;

import java.rmi.RemoteException;
import java.util.List;

import chances.wechat.entity.StbInfo;
import chances.wechat.entity.WechatStbBind;
import chances.wechat.msggw.context.BindContext;
import chances.wechat.msggw.context.QrBindContext;
import chances.wechat.msggw.context.QrContext;
import chances.wechat.msggw.resp.BaseResponse;
import chances.wechat.msggw.resp.BindResponse;
import chances.wechat.msggw.resp.QrResponse;

public interface BindService {

	/**
	 * 查询用户已绑定的全部机顶盒.
	 * 
	 * @return List<Bind>
	 */
	public WechatStbBind query(String userId, String stbNo);
	
	/**
	 * 查询用户已绑定的机顶盒.
	 * 
	 * @return List<Bind>
	 */
	public List<WechatStbBind> listBind(String userId);

	/**
	 * 解除用户已绑定的机顶盒.
	 * 
	 * @return
	 */
	public void unBind(String userId, String stbNo);
	
	/**
	 * 解除用户已绑定的机顶盒(互动接口).
	 * 
	 * @return
	 */
	public BaseResponse unBind(BindContext bindContext) throws RemoteException;

	/**
	 * 绑定用户的机顶盒.
	 * 
	 * @return
	 */
	public void bind(WechatStbBind bind);
	
	/**
	 * 绑定用户的机顶盒(互动接口).
	 * 
	 * @return
	 */
	public BindResponse bind(QrBindContext qrBindContext) throws RemoteException;
	
	/**
	 * 绑定用户的机顶盒.
	 * 
	 * @return
	 */
	public void updateBindStatus(WechatStbBind bind);
	
	/**
	 * 
	 * 
	 * @return
	 */
	public QrResponse getQrCode(QrContext qrContext) throws RemoteException;
	
	
	/**
	 * 查询用户机顶盒信息
	 * 
	 * @param stbNo
	 */
	public StbInfo queryStbInfo(String stbNo);

	public void delBind(Long bindId);
	
//	public BindResponse bindStb(QrContext qrContext) throws RemoteException;

    public void updateBindDesc(String bindId, String desc);
}
